package com.briup.day12;

public class Test_JDK8Action {
    public static void main(String[] args) {
        JDK8Action action =new JDK8ActionImpl();
        action.start();
        action.stop();
        action.dFun();
//        action.sFun();//接口的静态方法，只能有接口来调用
            }
}
interface JDK8Action {
    void start();

    public abstract void stop();

    public default void dFun() {
        System.out.println("dFun默认方法");
    }

    public static void sFun() {
        System.out.println("sFun默认方法");
    }
}
class JDK8ActionImpl implements JDK8Action {
    @Override
    public void start() {
        System.out.println("start");
    }
    @Override
    public void stop() {
        System.out.println("stop");
    }
}
